home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / AMOS / AMOSList0597 / AMOSLIST / text0251.txt < prev    next >
Encoding:
Text File  |  1997-06-01  |  1.2 KB  |  25 lines

  1. Hello.
  2.  
  3. I am thinking of programming an AMOS game with robots that you can
  4. actually program in a BASIC-type language. Unfortunately I don't know
  5. how to write a decent arithmetic evaluation routine in AMOS. It should
  6. evaluate expressions in the correct order, e.g. "2+(3+4)*5" is 37. I've
  7. only managed to write an evaluation routine which doesn't care about
  8. calculation orders, e.g. "2+3*4" would be 20, not 14. I need your help
  9. here! Write me a routine that reads an expression as a string variable
  10. and stores the result in a number variable. If you do this I will
  11. eventually include your name in the game's documentation. Thanks in
  12. advance.
  13.  
  14.  
  15. /----------------------------------------------------------------------\
  16. | Joona Palaste                             |      |  |                |
  17. | palaste@cc.helsinki.fi                    |      |  |                |
  18. | G++ FR FW+ M- #20 D+ ADA N+++ W++ B OP+   |-------  -----------------|
  19. |                                           |-------  -----------------|
  20. |                                           |      |  |                |
  21. | Finland rules! =>                         |      |  |                |
  22. \----------------------------------------------------------------------/
  23.  
  24.  
  25.